const SMSClient = require('@alicloud/sms-sdk')
// ACCESS_KEY_ID/ACCESS_KEY_SECRET 根据实际申请的账号信息进行替换
const accessKeyId = 'LTAIjh2rFs1xibPV'
const secretAccessKey = 'bejP1puW2RDAyv2OayjVUV7jbpEbk7'
//初始化sms_client
let smsClient = new SMSClient({
    accessKeyId,
    secretAccessKey
})
//发送短信
exports.sendMSG = (callback) => {
    smsClient.sendSMS({
        PhoneNumbers: '',
        SignName: '',
        TemplateCode: '',
        TemplateParam: '{"code":"82465"}'
    }).then(function (res) {
        let {
            Code
        } = res
        if (Code === 'OK') {
            //处理返回参数
            callback(res)
        }
    }, function (err) {
        callback(err)
    })
}